<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/USB/Device/vcom_serial.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_688c5dfbd99f3a5435dc860226c47105.html">USB</a></li><li class="navelem"><a class="el" href="dir_0cccf70620b7ab69b712eb5bd1705234.html">Device</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">vcom_serial.c</div></div>
</div><!--header-->
<div class="contents">
<a href="vcom__serial_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="preprocessor">#include &quot;SWM341.h&quot;</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="preprocessor">#include &quot;<a class="code" href="vcom__serial_8h.html">vcom_serial.h</a>&quot;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="keyword">extern</span> uint8_t  <a class="code hl_variable" href="vcom__serial_8c.html#ab60c3cff1fd75a4e5a9498a17bdf631c">USBD_DeviceDescriptor</a>[];</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="keyword">extern</span> uint8_t  <a class="code hl_variable" href="vcom__serial_8c.html#a614f7a948820f0feb4257652eafda311">USBD_ConfigDescriptor</a>[];</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="keyword">extern</span> uint8_t *<a class="code hl_variable" href="vcom__serial_8c.html#abbf4277041e4936cb36a4db57200d60d">USBD_StringDescriptor</a>[];</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#aefd6f61ae6c62e7e5fca8a106a5fc48a">    9</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="vcom__serial_8c.html#aefd6f61ae6c62e7e5fca8a106a5fc48a">VCOM_Init</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span>{</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span>    UART_InitStructure UART_initStruct;</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span>    USBD_Info.Mode = USBD_MODE_DEV;</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span>    USBD_Info.Speed = USBD_SPEED_FS;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span>    USBD_Info.CtrlPkSiz = <a class="code hl_define" href="hid__transfer_8h.html#a5162db480d212170c08d3d940d87be57">EP_CTRL_PKSZ</a>;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span>    USBD_Info.DescDevice = <a class="code hl_variable" href="vcom__serial_8c.html#ab60c3cff1fd75a4e5a9498a17bdf631c">USBD_DeviceDescriptor</a>;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span>    USBD_Info.DescConfig = <a class="code hl_variable" href="vcom__serial_8c.html#a614f7a948820f0feb4257652eafda311">USBD_ConfigDescriptor</a>;</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span>    USBD_Info.DescString = <a class="code hl_variable" href="vcom__serial_8c.html#abbf4277041e4936cb36a4db57200d60d">USBD_StringDescriptor</a>;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span>    USBD_Info.pClassRequest_Callback = <a class="code hl_function" href="vcom__serial_8c.html#ab9711d98ed46b59936f38426f8eefbe7">VCOM_ClassRequest</a>;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span>    USBD_Init();</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span>    PORT_Init(PORTM, PIN0, PORTM_PIN0_UART0_RX, 1);</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>    PORT_Init(PORTM, PIN1, PORTM_PIN1_UART0_TX, 0);</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span>    UART_initStruct.Baudrate = 57600;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>    UART_initStruct.DataBits = UART_DATA_8BIT;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>    UART_initStruct.Parity = UART_PARITY_NONE;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>    UART_initStruct.StopBits = UART_STOP_1BIT;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>    UART_initStruct.RXThreshold = 3;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>    UART_initStruct.RXThresholdIEn = 1;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>    UART_initStruct.TXThreshold = 3;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    UART_initStruct.TXThresholdIEn = 0;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    UART_initStruct.TimeoutTime = 10;       <span class="comment">//10个字符时间内未接收到新的数据则触发超时中断</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>    UART_initStruct.TimeoutIEn = 1;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    UART_Init(UART0, &amp;UART_initStruct);</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>    UART_Open(UART0);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>}</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#a38c26073ef07063ed778df5fb292fce3">   41</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="vcom__serial_8c.html#a38c26073ef07063ed778df5fb292fce3">USB_Handler</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>{</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>    uint32_t devif = USBD-&gt;DEVIF;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>    uint32_t epif  = USBD-&gt;EPIF;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    <span class="keywordflow">if</span>(devif &amp; USBD_DEVIF_RST_Msk)</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>        USBD-&gt;DEVIF = USBD_DEVIF_RST_Msk;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>    }</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    <span class="keywordflow">else</span> <span class="keywordflow">if</span>(devif &amp; USBD_DEVIF_SETCFG_Msk)</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>    {</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>        USBD-&gt;DEVIF = USBD_DEVIF_SETCFG_Msk;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>        USBD_RxReady(<a class="code hl_define" href="_mass_storage_8h.html#ac97a4e921a0878fb4f3669179eef999f">EP_BULK_OUT_NUM</a>);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>    }</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>    <span class="keywordflow">else</span> <span class="keywordflow">if</span>(devif &amp; USBD_DEVIF_SETUP_Msk)</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>    {</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>        USBD-&gt;SETUPSR = USBD_SETUPSR_DONE_Msk;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>        <span class="keywordflow">if</span>(USBD-&gt;SETUPSR &amp; USBD_SETUPSR_SUCC_Msk)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>        {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>            USBD_ProcessSetupPacket();</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>        }</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>    }</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>    {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>        <span class="keywordflow">if</span>(epif &amp; USBD_EPIF_INEP0_Msk)                  <span class="comment">// Ctrl IN</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>        {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>            <span class="keywordflow">if</span>(USBD_TxSuccess(0))</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>            {</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>                USBD_CtrlIn();</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>            }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>            USBD_TxIntClr(0);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>        }</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(epif &amp; USBD_EPIF_OUTEP0_Msk)            <span class="comment">// Ctrl OUT</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>        {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>            USBD_RxIntClr();</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>            <span class="keywordflow">if</span>(USBD_RxSuccess())</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>            {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>                <span class="keywordflow">if</span>(pUSB_Setup-&gt;bRequest == <a class="code hl_define" href="vcom__serial_8h.html#a97805d7ccff53ccc487fa4e77001dff1">SET_LINE_CODE</a>)</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>                {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>                    USBD_CtrlOut();</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>                    USBD_TxWrite(0, 0, 0);  <span class="comment">// Status stage</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>                    <a class="code hl_function" href="vcom__serial_8c.html#a155aa9c93721f38f143c9c7cfc9c0724">VCOM_SetLineCoding</a>();</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>                }</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>            }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>        }</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(epif &amp; (1 &lt;&lt; <a class="code hl_define" href="hid__transfer_8h.html#a44677a67e07421e9c150b320d3a17b60">EP_INT_IN_NUM</a>))            <span class="comment">// Int IN</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>        {</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>            USBD_TxIntClr(<a class="code hl_define" href="hid__transfer_8h.html#a44677a67e07421e9c150b320d3a17b60">EP_INT_IN_NUM</a>);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>        }</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(epif &amp; (1 &lt;&lt; <a class="code hl_define" href="_mass_storage_8h.html#a384aa1ac1f94fffbc8cc2c460decea78">EP_BULK_IN_NUM</a>))           <span class="comment">// Bulk IN</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>        {</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>            <span class="keywordflow">if</span>(USBD_TxSuccess(<a class="code hl_define" href="_mass_storage_8h.html#a384aa1ac1f94fffbc8cc2c460decea78">EP_BULK_IN_NUM</a>) )</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>            {</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>                <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a2a73b9405cbf2e37e82a6ae6fb7bc381">in_bytes</a> = 0;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>            }</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>            USBD_TxIntClr(<a class="code hl_define" href="_mass_storage_8h.html#a384aa1ac1f94fffbc8cc2c460decea78">EP_BULK_IN_NUM</a>);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>        }</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(epif &amp; (1 &lt;&lt; (<a class="code hl_define" href="_mass_storage_8h.html#ac97a4e921a0878fb4f3669179eef999f">EP_BULK_OUT_NUM</a> + 16)))   <span class="comment">// Bulk OUT</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>        {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>            USBD_RxIntClr();</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>            <span class="keywordflow">if</span>(USBD_RxSuccess())</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>            {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>                <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aeed56019034c1101216a447ee6a3129e">out_bytes</a> = USBD_RxRead((uint8_t *)<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a419785e390e1fdc7e6204ee9b8952b1b">out_buff</a>, 64);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>                <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a522d0f3f3588bf63f8fcb4fd31432a21">out_ready</a> = 1;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>            }</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>        }</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    }</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>}</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#ab9711d98ed46b59936f38426f8eefbe7">  116</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="vcom__serial_8c.html#ab9711d98ed46b59936f38426f8eefbe7">VCOM_ClassRequest</a>(USB_Setup_Packet_t * pSetup)</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>{</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>    <span class="keywordflow">if</span>(pSetup-&gt;bRequestType &amp; 0x80)     <span class="comment">// Device to host</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>    {</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>        <span class="keywordflow">switch</span>(pSetup-&gt;bRequest)</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>        {</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>        <span class="keywordflow">case</span> <a class="code hl_define" href="vcom__serial_8h.html#ad49171e986aa3a3c068072be9d2450f9">GET_LINE_CODE</a>:</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>            <span class="comment">/* Data stage */</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>            USBD_TxWrite(0, (uint8_t *)&amp;<a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a>, <span class="keyword">sizeof</span>(<a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a>));</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>            <span class="comment">/* Status stage */</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>            USBD_RxReady(0);</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>            <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>        <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>            <span class="comment">/* Setup error, stall the device */</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>            USBD_Stall0();</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>            <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>        }</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    }</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    <span class="keywordflow">else</span>                                <span class="comment">// Host to device</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    {</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>        <span class="keywordflow">switch</span>(pSetup-&gt;bRequest)</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>        {</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>        <span class="keywordflow">case</span> <a class="code hl_define" href="vcom__serial_8h.html#a437869c339749d5d011060cd5676659e">SET_CONTROL_LINE_STATE</a>:</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>            <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a860ceda9e667770f14f7777b8658a8f6">hw_flow</a> = pSetup-&gt;wValue;  <span class="comment">// hw_flow.0 DTR   hw_flow.1 RTS</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>            <span class="comment">/* Status stage */</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>            USBD_TxWrite(0, 0, 0);</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>            <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>        <span class="keywordflow">case</span> <a class="code hl_define" href="vcom__serial_8h.html#a97805d7ccff53ccc487fa4e77001dff1">SET_LINE_CODE</a>:</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>            USBD_PrepareCtrlOut((uint8_t *)&amp;<a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a>, 7);</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span> </div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>            <span class="comment">/* Status stage</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span><span class="comment">               读取数据再后执行 USBD_TxWrite(0, 0, 0)，否则主机可能会发来新的数据覆盖旧数据 */</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>            <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>        <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>            <span class="comment">/* Setup error, stall the device */</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>            USBD_Stall0();</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>            <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>        }</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>    }</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>}</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span> </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span><span class="comment">/****************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">  164</a></span><span class="keyword">volatile</span> <a class="code hl_struct" href="struct_v_c_o_m.html">VCOM</a> <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">  167</a></span><a class="code hl_struct" href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html">STR_VCOM_LINE_CODING</a> <a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a> = {57600, 0, 0, 8};   <span class="comment">// Baud rate : 57600, stop bits, parity bits, data bits</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#a155aa9c93721f38f143c9c7cfc9c0724">  170</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="vcom__serial_8c.html#a155aa9c93721f38f143c9c7cfc9c0724">VCOM_SetLineCoding</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>{</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>    uint8_t parity;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>    NVIC_DisableIRQ(UART0_IRQn);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>    <span class="comment">// Reset software FIFO</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>    <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a0c85918a955d98cae742339114e0f309">rx_bytes</a> = 0;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>    <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aa5a5ae13080d95e13674596beea1f501">rx_head</a> = 0;</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>    <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#ab1036d896fbac1257eb02b55c03fbd0a">rx_tail</a> = 0;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>    <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a8d0382c717944177134640c2593e6316">tx_bytes</a> = 0;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>    <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a4653f791cdbd8472a541756c40272fcb">tx_head</a> = 0;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>    <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a66b67df4bce66aeca9da1d52c8233259">tx_tail</a> = 0;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>    <span class="keywordflow">switch</span>(<a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a>.<a class="code hl_variable" href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#ab4c5130a70c2858ddd2e6755fa0421c8">u8ParityType</a>)</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>    {</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span>    <span class="keywordflow">case</span> 0:  parity = UART_PARITY_NONE; <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span>    <span class="keywordflow">case</span> 1:  parity = UART_PARITY_ODD;  <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>    <span class="keywordflow">case</span> 2:  parity = UART_PARITY_EVEN; <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>    <span class="keywordflow">case</span> 3:  parity = UART_PARITY_ONE;  <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>    <span class="keywordflow">case</span> 4:  parity = UART_PARITY_ZERO; <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>    <span class="keywordflow">default</span>: parity = UART_PARITY_NONE; <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>    }</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span> </div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span>    UART0-&gt;CTRL &amp;= ~(UART_CTRL_DATA9b_Msk | UART_CTRL_PARITY_Msk | UART_CTRL_STOP2b_Msk);</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span>    UART0-&gt;CTRL |= ((<a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a>.<a class="code hl_variable" href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#a33a0aa69454b7ea8484a3e7d7148859a">u8DataBits</a> == 9)   &lt;&lt; UART_CTRL_DATA9b_Pos) |</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span>                   (parity                      &lt;&lt; UART_CTRL_PARITY_Pos) |</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>                   ((<a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a>.<a class="code hl_variable" href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#a7d884374e398be1d988c830c574771d7">u8CharFormat</a> == 2) &lt;&lt; UART_CTRL_STOP2b_Pos);</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>    UART_SetBaudrate(UART0, <a class="code hl_variable" href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a>.<a class="code hl_variable" href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#ad07d62fd4e32e3979aa2a200c9a71a57">u32DTERate</a>);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>    NVIC_EnableIRQ(UART0_IRQn);</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>}</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span> </div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#a7a9dd20dbd915a8000c1482b87ae93ff">  205</a></span><span class="keyword">static</span> <span class="keyword">volatile</span> uint32_t <a class="code hl_variable" href="vcom__serial_8c.html#a7a9dd20dbd915a8000c1482b87ae93ff">RX_Timeout</a> = 0;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span> </div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#ace674682ce944da61189c43d4d6c16a8">  207</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="vcom__serial_8c.html#ace674682ce944da61189c43d4d6c16a8">VCOM_TransferData</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>{</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>    int32_t i, len;</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span>    <span class="comment">/* Check whether USB is ready for next packet or not */</span></div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span>    <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a2a73b9405cbf2e37e82a6ae6fb7bc381">in_bytes</a> == 0)</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span>    {</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>        <span class="comment">/* Check whether we have new COM Rx data to send to USB or not */</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>        <span class="keywordflow">if</span>((<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a0c85918a955d98cae742339114e0f309">rx_bytes</a> &gt;= <a class="code hl_define" href="_mass_storage_8h.html#a89463ae575c1b5a8c87fa781a57804f5">EP_BULK_IN_PKSZ</a>) || <a class="code hl_variable" href="vcom__serial_8c.html#a7a9dd20dbd915a8000c1482b87ae93ff">RX_Timeout</a>)</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>        {</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span>            <a class="code hl_variable" href="vcom__serial_8c.html#a7a9dd20dbd915a8000c1482b87ae93ff">RX_Timeout</a> = 0;</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span> </div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>            len = <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a0c85918a955d98cae742339114e0f309">rx_bytes</a>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>            <span class="keywordflow">if</span>(len &gt; <a class="code hl_define" href="_mass_storage_8h.html#a89463ae575c1b5a8c87fa781a57804f5">EP_BULK_IN_PKSZ</a>)</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>                len = <a class="code hl_define" href="_mass_storage_8h.html#a89463ae575c1b5a8c87fa781a57804f5">EP_BULK_IN_PKSZ</a>;</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span> </div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span>            <span class="keywordflow">for</span>(i = 0; i &lt; len; i++)</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>            {</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>                <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a7cf363f07ffa8de3f1bd87ca093db1c8">in_buff</a>[i] = <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a21947d0563be863ab4481a401151d3ff">rx_buff</a>[<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aa5a5ae13080d95e13674596beea1f501">rx_head</a>++];</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>                <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aa5a5ae13080d95e13674596beea1f501">rx_head</a> &gt;= <a class="code hl_define" href="vcom__serial_8h.html#a9ffd460647ecd927786c7d3db9297e05">RX_BUFF_SIZE</a>)</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>                    <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aa5a5ae13080d95e13674596beea1f501">rx_head</a> = 0;</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>            }</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span> </div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span>            __disable_irq();</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>            <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a0c85918a955d98cae742339114e0f309">rx_bytes</a> -= len;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span>            __enable_irq();</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span> </div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span>            <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a2a73b9405cbf2e37e82a6ae6fb7bc381">in_bytes</a> = len;</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span>            USBD_TxWrite(<a class="code hl_define" href="_mass_storage_8h.html#a384aa1ac1f94fffbc8cc2c460decea78">EP_BULK_IN_NUM</a>, (uint8_t *)<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a7cf363f07ffa8de3f1bd87ca093db1c8">in_buff</a>, len);</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>        }</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>        <span class="keywordflow">else</span></div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>        {</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span>            <span class="comment">/* Prepare a zero packet if previous packet size is EP_BULK_IN_PKSZ and</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span><span class="comment">               no more data to send at this moment to note Host the transfer has been done */</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>            <span class="keywordflow">if</span>(USBD-&gt;INEP[<a class="code hl_define" href="_mass_storage_8h.html#a384aa1ac1f94fffbc8cc2c460decea78">EP_BULK_IN_NUM</a>].TXTRSZ == <a class="code hl_define" href="_mass_storage_8h.html#a89463ae575c1b5a8c87fa781a57804f5">EP_BULK_IN_PKSZ</a>)</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span>                USBD_TxWrite(<a class="code hl_define" href="_mass_storage_8h.html#a384aa1ac1f94fffbc8cc2c460decea78">EP_BULK_IN_NUM</a>, 0, 0);</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>        }</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span>    }</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span> </div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span>    <span class="comment">/* Process the Bulk out data when bulk out data is ready. */</span></div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>    <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a522d0f3f3588bf63f8fcb4fd31432a21">out_ready</a> &amp;&amp; (<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aeed56019034c1101216a447ee6a3129e">out_bytes</a> &lt;= <a class="code hl_define" href="vcom__serial_8h.html#afa25b3e17e1a96229f5aaf7115211c4c">TX_BUFF_SIZE</a> - <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a8d0382c717944177134640c2593e6316">tx_bytes</a>))</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>    {</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>        <span class="keywordflow">for</span>(i = 0; i &lt; <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aeed56019034c1101216a447ee6a3129e">out_bytes</a>; i++)</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span>        {</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span>            <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a1dc6bc8df586f9490a44b726ffef3e2e">tx_buff</a>[<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a66b67df4bce66aeca9da1d52c8233259">tx_tail</a>++] = <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a419785e390e1fdc7e6204ee9b8952b1b">out_buff</a>[i];</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span>            <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a66b67df4bce66aeca9da1d52c8233259">tx_tail</a> &gt;= <a class="code hl_define" href="vcom__serial_8h.html#afa25b3e17e1a96229f5aaf7115211c4c">TX_BUFF_SIZE</a>)</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>                <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a66b67df4bce66aeca9da1d52c8233259">tx_tail</a> = 0;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span>        }</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span> </div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span>        __disable_irq();</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span>        <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a8d0382c717944177134640c2593e6316">tx_bytes</a> += <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#aeed56019034c1101216a447ee6a3129e">out_bytes</a>;</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>        __enable_irq();</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span> </div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>        <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a522d0f3f3588bf63f8fcb4fd31432a21">out_ready</a> = 0;     <span class="comment">// Clear bulk out ready flag</span></div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span> </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span>        <span class="comment">/* Ready to get next BULK out */</span></div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span>        USBD_RxReady(<a class="code hl_define" href="_mass_storage_8h.html#ac97a4e921a0878fb4f3669179eef999f">EP_BULK_OUT_NUM</a>);</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span>    }</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span>    <span class="comment">/* Process the software Tx FIFO */</span></div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span>    <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a8d0382c717944177134640c2593e6316">tx_bytes</a>)</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span>    {</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span>        <span class="keywordflow">while</span>(!UART_IsTXFIFOFull(UART0))</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span>        {</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span>            UART0-&gt;DATA = <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a1dc6bc8df586f9490a44b726ffef3e2e">tx_buff</a>[<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a4653f791cdbd8472a541756c40272fcb">tx_head</a>++];</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>            <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a4653f791cdbd8472a541756c40272fcb">tx_head</a> &gt;= <a class="code hl_define" href="vcom__serial_8h.html#afa25b3e17e1a96229f5aaf7115211c4c">TX_BUFF_SIZE</a>)</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span>                <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a4653f791cdbd8472a541756c40272fcb">tx_head</a> = 0;</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span>            <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a8d0382c717944177134640c2593e6316">tx_bytes</a>--;</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span> </div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>            <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a8d0382c717944177134640c2593e6316">tx_bytes</a> == 0)</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span>                <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span>        }</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span>    }</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span>}</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span> </div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span> </div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#a76fc980edb312c2e7817fe8b3abffa91">  283</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="vcom__serial_8c.html#a76fc980edb312c2e7817fe8b3abffa91">putOneChar</a>(<span class="keywordtype">char</span> chr)</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span>{</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span>    <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a0c85918a955d98cae742339114e0f309">rx_bytes</a> &lt; <a class="code hl_define" href="vcom__serial_8h.html#a9ffd460647ecd927786c7d3db9297e05">RX_BUFF_SIZE</a>)    <span class="comment">// Check if buffer full</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span>    {</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span>        <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a21947d0563be863ab4481a401151d3ff">rx_buff</a>[<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#ab1036d896fbac1257eb02b55c03fbd0a">rx_tail</a>++] = chr;</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span>        <span class="keywordflow">if</span>(<a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#ab1036d896fbac1257eb02b55c03fbd0a">rx_tail</a> &gt;= <a class="code hl_define" href="vcom__serial_8h.html#a9ffd460647ecd927786c7d3db9297e05">RX_BUFF_SIZE</a>)</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span>            <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#ab1036d896fbac1257eb02b55c03fbd0a">rx_tail</a> = 0;</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno">  290</span>        <a class="code hl_variable" href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a>.<a class="code hl_variable" href="struct_v_c_o_m.html#a0c85918a955d98cae742339114e0f309">rx_bytes</a>++;</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span>    }</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span>}</div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span> </div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"><a class="line" href="vcom__serial_8c.html#a82b7b0fba46f37a99898682733d4c73f">  294</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="vcom__serial_8c.html#a82b7b0fba46f37a99898682733d4c73f">UART0_Handler</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span>{</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span>    uint32_t chr;</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno">  297</span> </div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span>    <span class="keywordflow">if</span>(UART_INTStat(UART0, UART_IT_RX_THR | UART_IT_RX_TOUT))</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno">  299</span>    {</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span>        <span class="keywordflow">while</span>(UART_IsRXFIFOEmpty(UART0) == 0)</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span>        {</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span>            UART_ReadByte(UART0, &amp;chr);</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno">  303</span>            <a class="code hl_function" href="vcom__serial_8c.html#a76fc980edb312c2e7817fe8b3abffa91">putOneChar</a>(chr);</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span>        }</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span> </div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span>        <span class="keywordflow">if</span>(UART_INTStat(UART0, UART_IT_RX_TOUT))</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno">  307</span>        {</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno">  308</span>            UART_INTClr(UART0, UART_IT_RX_TOUT);</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span> </div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span>            <a class="code hl_variable" href="vcom__serial_8c.html#a7a9dd20dbd915a8000c1482b87ae93ff">RX_Timeout</a> = 1;</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span>        }</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span>    }</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span>}</div>
<div class="ttc" id="a_mass_storage_8h_html_a384aa1ac1f94fffbc8cc2c460decea78"><div class="ttname"><a href="_mass_storage_8h.html#a384aa1ac1f94fffbc8cc2c460decea78">EP_BULK_IN_NUM</a></div><div class="ttdeci">#define EP_BULK_IN_NUM</div><div class="ttdef"><b>Definition:</b> <a href="_mass_storage_8h_source.html#l00014">MassStorage.h:14</a></div></div>
<div class="ttc" id="a_mass_storage_8h_html_a89463ae575c1b5a8c87fa781a57804f5"><div class="ttname"><a href="_mass_storage_8h.html#a89463ae575c1b5a8c87fa781a57804f5">EP_BULK_IN_PKSZ</a></div><div class="ttdeci">#define EP_BULK_IN_PKSZ</div><div class="ttdef"><b>Definition:</b> <a href="_mass_storage_8h_source.html#l00018">MassStorage.h:18</a></div></div>
<div class="ttc" id="a_mass_storage_8h_html_ac97a4e921a0878fb4f3669179eef999f"><div class="ttname"><a href="_mass_storage_8h.html#ac97a4e921a0878fb4f3669179eef999f">EP_BULK_OUT_NUM</a></div><div class="ttdeci">#define EP_BULK_OUT_NUM</div><div class="ttdef"><b>Definition:</b> <a href="_mass_storage_8h_source.html#l00015">MassStorage.h:15</a></div></div>
<div class="ttc" id="ahid__transfer_8h_html_a44677a67e07421e9c150b320d3a17b60"><div class="ttname"><a href="hid__transfer_8h.html#a44677a67e07421e9c150b320d3a17b60">EP_INT_IN_NUM</a></div><div class="ttdeci">#define EP_INT_IN_NUM</div><div class="ttdef"><b>Definition:</b> <a href="hid__transfer_8h_source.html#l00010">hid_transfer.h:10</a></div></div>
<div class="ttc" id="ahid__transfer_8h_html_a5162db480d212170c08d3d940d87be57"><div class="ttname"><a href="hid__transfer_8h.html#a5162db480d212170c08d3d940d87be57">EP_CTRL_PKSZ</a></div><div class="ttdeci">#define EP_CTRL_PKSZ</div><div class="ttdef"><b>Definition:</b> <a href="hid__transfer_8h_source.html#l00013">hid_transfer.h:13</a></div></div>
<div class="ttc" id="astruct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g_html"><div class="ttname"><a href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html">STR_VCOM_LINE_CODING</a></div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00027">vcom_serial.h:28</a></div></div>
<div class="ttc" id="astruct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g_html_a33a0aa69454b7ea8484a3e7d7148859a"><div class="ttname"><a href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#a33a0aa69454b7ea8484a3e7d7148859a">STR_VCOM_LINE_CODING::u8DataBits</a></div><div class="ttdeci">uint8_t u8DataBits</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00032">vcom_serial.h:32</a></div></div>
<div class="ttc" id="astruct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g_html_a7d884374e398be1d988c830c574771d7"><div class="ttname"><a href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#a7d884374e398be1d988c830c574771d7">STR_VCOM_LINE_CODING::u8CharFormat</a></div><div class="ttdeci">uint8_t u8CharFormat</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00030">vcom_serial.h:30</a></div></div>
<div class="ttc" id="astruct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g_html_ab4c5130a70c2858ddd2e6755fa0421c8"><div class="ttname"><a href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#ab4c5130a70c2858ddd2e6755fa0421c8">STR_VCOM_LINE_CODING::u8ParityType</a></div><div class="ttdeci">uint8_t u8ParityType</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00031">vcom_serial.h:31</a></div></div>
<div class="ttc" id="astruct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g_html_ad07d62fd4e32e3979aa2a200c9a71a57"><div class="ttname"><a href="struct_s_t_r___v_c_o_m___l_i_n_e___c_o_d_i_n_g.html#ad07d62fd4e32e3979aa2a200c9a71a57">STR_VCOM_LINE_CODING::u32DTERate</a></div><div class="ttdeci">uint32_t u32DTERate</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00029">vcom_serial.h:29</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html"><div class="ttname"><a href="struct_v_c_o_m.html">VCOM</a></div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00041">vcom_serial.h:41</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a0c85918a955d98cae742339114e0f309"><div class="ttname"><a href="struct_v_c_o_m.html#a0c85918a955d98cae742339114e0f309">VCOM::rx_bytes</a></div><div class="ttdeci">uint16_t rx_bytes</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00043">vcom_serial.h:43</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a1dc6bc8df586f9490a44b726ffef3e2e"><div class="ttname"><a href="struct_v_c_o_m.html#a1dc6bc8df586f9490a44b726ffef3e2e">VCOM::tx_buff</a></div><div class="ttdeci">uint8_t tx_buff[TX_BUFF_SIZE]</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00046">vcom_serial.h:46</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a21947d0563be863ab4481a401151d3ff"><div class="ttname"><a href="struct_v_c_o_m.html#a21947d0563be863ab4481a401151d3ff">VCOM::rx_buff</a></div><div class="ttdeci">uint8_t rx_buff[RX_BUFF_SIZE]</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00042">vcom_serial.h:42</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a2a73b9405cbf2e37e82a6ae6fb7bc381"><div class="ttname"><a href="struct_v_c_o_m.html#a2a73b9405cbf2e37e82a6ae6fb7bc381">VCOM::in_bytes</a></div><div class="ttdeci">uint16_t in_bytes</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00054">vcom_serial.h:54</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a419785e390e1fdc7e6204ee9b8952b1b"><div class="ttname"><a href="struct_v_c_o_m.html#a419785e390e1fdc7e6204ee9b8952b1b">VCOM::out_buff</a></div><div class="ttdeci">uint8_t out_buff[64]</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00055">vcom_serial.h:55</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a4653f791cdbd8472a541756c40272fcb"><div class="ttname"><a href="struct_v_c_o_m.html#a4653f791cdbd8472a541756c40272fcb">VCOM::tx_head</a></div><div class="ttdeci">uint16_t tx_head</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00048">vcom_serial.h:48</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a522d0f3f3588bf63f8fcb4fd31432a21"><div class="ttname"><a href="struct_v_c_o_m.html#a522d0f3f3588bf63f8fcb4fd31432a21">VCOM::out_ready</a></div><div class="ttdeci">uint16_t out_ready</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00057">vcom_serial.h:57</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a66b67df4bce66aeca9da1d52c8233259"><div class="ttname"><a href="struct_v_c_o_m.html#a66b67df4bce66aeca9da1d52c8233259">VCOM::tx_tail</a></div><div class="ttdeci">uint16_t tx_tail</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00049">vcom_serial.h:49</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a7cf363f07ffa8de3f1bd87ca093db1c8"><div class="ttname"><a href="struct_v_c_o_m.html#a7cf363f07ffa8de3f1bd87ca093db1c8">VCOM::in_buff</a></div><div class="ttdeci">uint8_t in_buff[64]</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00053">vcom_serial.h:53</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a860ceda9e667770f14f7777b8658a8f6"><div class="ttname"><a href="struct_v_c_o_m.html#a860ceda9e667770f14f7777b8658a8f6">VCOM::hw_flow</a></div><div class="ttdeci">uint16_t hw_flow</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00051">vcom_serial.h:51</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_a8d0382c717944177134640c2593e6316"><div class="ttname"><a href="struct_v_c_o_m.html#a8d0382c717944177134640c2593e6316">VCOM::tx_bytes</a></div><div class="ttdeci">uint16_t tx_bytes</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00047">vcom_serial.h:47</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_aa5a5ae13080d95e13674596beea1f501"><div class="ttname"><a href="struct_v_c_o_m.html#aa5a5ae13080d95e13674596beea1f501">VCOM::rx_head</a></div><div class="ttdeci">uint16_t rx_head</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00044">vcom_serial.h:44</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_ab1036d896fbac1257eb02b55c03fbd0a"><div class="ttname"><a href="struct_v_c_o_m.html#ab1036d896fbac1257eb02b55c03fbd0a">VCOM::rx_tail</a></div><div class="ttdeci">uint16_t rx_tail</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00045">vcom_serial.h:45</a></div></div>
<div class="ttc" id="astruct_v_c_o_m_html_aeed56019034c1101216a447ee6a3129e"><div class="ttname"><a href="struct_v_c_o_m.html#aeed56019034c1101216a447ee6a3129e">VCOM::out_bytes</a></div><div class="ttdeci">uint16_t out_bytes</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00056">vcom_serial.h:56</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_a155aa9c93721f38f143c9c7cfc9c0724"><div class="ttname"><a href="vcom__serial_8c.html#a155aa9c93721f38f143c9c7cfc9c0724">VCOM_SetLineCoding</a></div><div class="ttdeci">void VCOM_SetLineCoding(void)</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00170">vcom_serial.c:170</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_a38c26073ef07063ed778df5fb292fce3"><div class="ttname"><a href="vcom__serial_8c.html#a38c26073ef07063ed778df5fb292fce3">USB_Handler</a></div><div class="ttdeci">void USB_Handler(void)</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00041">vcom_serial.c:41</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_a614f7a948820f0feb4257652eafda311"><div class="ttname"><a href="vcom__serial_8c.html#a614f7a948820f0feb4257652eafda311">USBD_ConfigDescriptor</a></div><div class="ttdeci">uint8_t USBD_ConfigDescriptor[]</div><div class="ttdef"><b>Definition:</b> <a href="descriptors__cdc_8c_source.html#l00024">descriptors_cdc.c:24</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_a76fc980edb312c2e7817fe8b3abffa91"><div class="ttname"><a href="vcom__serial_8c.html#a76fc980edb312c2e7817fe8b3abffa91">putOneChar</a></div><div class="ttdeci">static void putOneChar(char chr)</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00283">vcom_serial.c:283</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_a7a9dd20dbd915a8000c1482b87ae93ff"><div class="ttname"><a href="vcom__serial_8c.html#a7a9dd20dbd915a8000c1482b87ae93ff">RX_Timeout</a></div><div class="ttdeci">static volatile uint32_t RX_Timeout</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00205">vcom_serial.c:205</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_a82b7b0fba46f37a99898682733d4c73f"><div class="ttname"><a href="vcom__serial_8c.html#a82b7b0fba46f37a99898682733d4c73f">UART0_Handler</a></div><div class="ttdeci">void UART0_Handler(void)</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00294">vcom_serial.c:294</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_aaf4224bb08959bdd488bfadb7c3ef5c5"><div class="ttname"><a href="vcom__serial_8c.html#aaf4224bb08959bdd488bfadb7c3ef5c5">vcom</a></div><div class="ttdeci">volatile VCOM vcom</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00164">vcom_serial.c:164</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_ab60c3cff1fd75a4e5a9498a17bdf631c"><div class="ttname"><a href="vcom__serial_8c.html#ab60c3cff1fd75a4e5a9498a17bdf631c">USBD_DeviceDescriptor</a></div><div class="ttdeci">uint8_t USBD_DeviceDescriptor[]</div><div class="ttdef"><b>Definition:</b> <a href="descriptors__cdc_8c_source.html#l00005">descriptors_cdc.c:5</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_ab9711d98ed46b59936f38426f8eefbe7"><div class="ttname"><a href="vcom__serial_8c.html#ab9711d98ed46b59936f38426f8eefbe7">VCOM_ClassRequest</a></div><div class="ttdeci">void VCOM_ClassRequest(USB_Setup_Packet_t *pSetup)</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00116">vcom_serial.c:116</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_abbf4277041e4936cb36a4db57200d60d"><div class="ttname"><a href="vcom__serial_8c.html#abbf4277041e4936cb36a4db57200d60d">USBD_StringDescriptor</a></div><div class="ttdeci">uint8_t * USBD_StringDescriptor[]</div><div class="ttdef"><b>Definition:</b> <a href="descriptors__cdc_8c_source.html#l00131">descriptors_cdc.c:131</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_ac695109a0d9dd728ec8d10f6e370ae2f"><div class="ttname"><a href="vcom__serial_8c.html#ac695109a0d9dd728ec8d10f6e370ae2f">LineCfg</a></div><div class="ttdeci">STR_VCOM_LINE_CODING LineCfg</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00167">vcom_serial.c:167</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_ace674682ce944da61189c43d4d6c16a8"><div class="ttname"><a href="vcom__serial_8c.html#ace674682ce944da61189c43d4d6c16a8">VCOM_TransferData</a></div><div class="ttdeci">void VCOM_TransferData(void)</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00207">vcom_serial.c:207</a></div></div>
<div class="ttc" id="avcom__serial_8c_html_aefd6f61ae6c62e7e5fca8a106a5fc48a"><div class="ttname"><a href="vcom__serial_8c.html#aefd6f61ae6c62e7e5fca8a106a5fc48a">VCOM_Init</a></div><div class="ttdeci">void VCOM_Init(void)</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8c_source.html#l00009">vcom_serial.c:9</a></div></div>
<div class="ttc" id="avcom__serial_8h_html"><div class="ttname"><a href="vcom__serial_8h.html">vcom_serial.h</a></div></div>
<div class="ttc" id="avcom__serial_8h_html_a437869c339749d5d011060cd5676659e"><div class="ttname"><a href="vcom__serial_8h.html#a437869c339749d5d011060cd5676659e">SET_CONTROL_LINE_STATE</a></div><div class="ttdeci">#define SET_CONTROL_LINE_STATE</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00024">vcom_serial.h:24</a></div></div>
<div class="ttc" id="avcom__serial_8h_html_a97805d7ccff53ccc487fa4e77001dff1"><div class="ttname"><a href="vcom__serial_8h.html#a97805d7ccff53ccc487fa4e77001dff1">SET_LINE_CODE</a></div><div class="ttdeci">#define SET_LINE_CODE</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00022">vcom_serial.h:22</a></div></div>
<div class="ttc" id="avcom__serial_8h_html_a9ffd460647ecd927786c7d3db9297e05"><div class="ttname"><a href="vcom__serial_8h.html#a9ffd460647ecd927786c7d3db9297e05">RX_BUFF_SIZE</a></div><div class="ttdeci">#define RX_BUFF_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00038">vcom_serial.h:38</a></div></div>
<div class="ttc" id="avcom__serial_8h_html_ad49171e986aa3a3c068072be9d2450f9"><div class="ttname"><a href="vcom__serial_8h.html#ad49171e986aa3a3c068072be9d2450f9">GET_LINE_CODE</a></div><div class="ttdeci">#define GET_LINE_CODE</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00023">vcom_serial.h:23</a></div></div>
<div class="ttc" id="avcom__serial_8h_html_afa25b3e17e1a96229f5aaf7115211c4c"><div class="ttname"><a href="vcom__serial_8h.html#afa25b3e17e1a96229f5aaf7115211c4c">TX_BUFF_SIZE</a></div><div class="ttdeci">#define TX_BUFF_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="vcom__serial_8h_source.html#l00039">vcom_serial.h:39</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
